﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace FB.Membership.Annotations
{
    [AttributeUsage(AttributeTargets.Enum)]
    public class SecurityFlagAttribute : FlagsAttribute
    {
        public int Module { get; set; }
        public int Flag { get; set; }

        public SecurityFlagAttribute() { }
        public SecurityFlagAttribute(int flag) : this(0, flag) { }
        public SecurityFlagAttribute(int module, int flag) { this.Module = module; this.Flag = flag; }
    }

    [AttributeUsage(AttributeTargets.Enum)]
    public class ViewScopeFlagAttribute : SecurityFlagAttribute
    {
        public int Menu { get; set; }

        public ViewScopeFlagAttribute() { }
        public ViewScopeFlagAttribute(int menu, int flag) : this(0, menu, flag) { }
        public ViewScopeFlagAttribute(int module, int menu, int flag) { this.Module = module; this.Menu = menu; this.Flag = flag; }
    }

}